import 'package:flutter/material.dart';
import 'package:flutter_todo_2019/page/need_dealtwith/need_dealtwith_item.dart';
import 'package:sticky_headers/sticky_headers.dart';

var headUrl =
    "https://img2.soyoung.com/message/ios/20190405/4/d726d35417b67f22807c49ffa8bea301_64_64.png";

/// 记录界面分组列表
///
///
class RecordGroupPage extends StatelessWidget {
  final title;

  const RecordGroupPage({Key key, this.title}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
        appBar: new AppBar(
            title: new Text(title,
                style: TextStyle(color: Colors.white, fontSize: 16)),
            centerTitle: true),
        body:
              new ListView.builder(itemBuilder: (context, index) {
                index = index + 1;
                return new StickyHeader(
                    header: new Container(
                      height: 40.0,
                      color: Colors.lightBlueAccent,
                      padding: new EdgeInsets.symmetric(horizontal: 16.0),
                      alignment: Alignment.centerLeft,
                      child: new Text(
                        '2019年 持续进步的 $index' + "天",
                        style: const TextStyle(fontSize: 14.5,color: Colors.white),
                      ),
                    ),
                    content: new Column(
                      children: <Widget>[
                        new Container(
                          child: ContactItem(
                              titleName: '我是牛栋同学 $index',
                              imageName: 'images/icon_chat.png'),
                        ),
                        new Container(
                          child: ContactItem(
                              titleName: '要放假了 $index',
                              imageName: 'images/icon_add_firends.png'),
                        ),
                        new Container(
                          child: ContactItem(
                              titleName: '国庆快乐 $index',
                              imageName: 'images/icon_hot.png'),
                        ),
                      ],
                    ));
              }
        )
    );
  }
}
